package cn.z2huo.knowledge.basic.keyword.$assert;

/**
 * <p>
 *
 * @author z2huo
 */
public class AssertExpressionTest {

    public static void main(String[] args) {

//        assert false : "断言失败";
        assert false : getMessage("1");
        System.out.println("error message");
    }

    public static String getMessage(String code) {
        return switch (code) {
            case "1" -> "error1";
            case "2" -> "error2";
            default -> "error3";
        };
    }
}
